package com.wuax.util;

import javax.servlet.http.HttpServletRequest;

public class CommonUtil {

    /**
     * 获取当前地址基础地址
     *
     * @param request HttpServletRequest
     * @return String
     */
    public static String getBasePath(HttpServletRequest request) {
        String path = request.getContextPath();
        return request.getScheme() + "://" + request.getServerName() + ":" + request.getServerPort() + path
                + "/";
    }
}
